<?PHP

import('izz.util.Singleton');

/**
 * Dao factory class
 * 
 * @package  iforum.dao
 * @author   iCer <iCer@justdn.com>
 * @version  $Id: DAOFactory.php,v 1.1.1.1 2005/03/03 04:53:16 icer Exp $
 */
class DAOFactory
{
	/**
	 * get a DaoFactory instance
	 *
	 * @param string $factoryType Dao factory type, such as 'MySQL'
	 * @return object
	 */
	function &getDAOFactory($factoryType)
	{
		switch ($factoryType) 
		{
			case 'MySQL': 
				import('iforum.dao.mysql.MySQLDAOFactory');				
				return Singleton::instance('MySQLDAOFactory');				
				break;
		
			default:
				new iZzError('Invaild data source');
				break;
		}
	}
}
?>